package com.offcn;

import com.offcn.service.UserService;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import javax.annotation.Resource;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = "classpath:applicationContext.xml")
public class Client {
    @Resource
    private UserService userService;

    @Test
    public void test() throws Exception{
        System.out.println(userService);
        System.out.println(userService.getClass());
        String content = userService.sayHi("球球");
        System.out.println(content);
    }

}
